-------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\Siyao\Dropbox\Yue-Siyao\Project Subsidy\PSRM replication files\analysis_other.log
  log type:  text
 opened on:  18 Aug 2022, 21:37:22

. 
. use "subsidy_leader_full.dta",clear 

. count //29100 
  29,100

. 
. 
. *Table A.1 - Number of firms and ownership types
. label values year year

. gen firm_type2=firm_type
(280 missing values generated)

. replace firm_type2="Other" if firm_type=="Collective enterprises"|firm_type=="Other enterprises"|firm_type=="Publ
> ic enterprises"|firm_type=="Foreign enterprises"|firm_type==""
(2,618 real changes made)

. *tabout year firm_type2 using TableA1.tex, style(tex) format(0) replace
. 
. 
. *Figure A.3 - Distribution of publicly listed companies across 31 provinces
. clear 

. use firm_count_map.dta

. 
. spmap firm_count using Provinces_1997_shp, id(_ID) fcolor(Blues) ///
> clmethod(custom) clbreaks(0 1 29 43.5 96 575) ///
> legend(symy(*1.2) symx(*1.2) size(*1.2) position(9) bmargin(top)) legorder(lohi)  

. 
. *graph export FigureA3.png, replace 
. 
. 
. *Table A.12 - Effect of political connections on private firm subsidies
. clear

. use "firm_polcon.dta", replace

. tab private, m

    private |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        868       63.17       63.17
          1 |        426       31.00       94.18
          . |         80        5.82      100.00
------------+-----------------------------------
      Total |      1,374      100.00

. su polcon_ratio 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
polcon_ratio |      1,374    .2025307    .1311959          0   .7857143

. 
. count // 1374  
  1,374

. xtset firmID year  
       panel variable:  firmID (unbalanced)
        time variable:  year, 2008 to 2015, but with a gap
                delta:  1 unit

. *set up fe
. egen industry_name_CSRC_f=group(industry_name_CSRC)

. egen industry_year=group(industry_name_CSRC year)

. encode current_gvn, gen(current_gvn_f)

. 
. *Table A.12 - Political connections and private firm subsidies
. reghdfe subsidy_assets_w L.polcon_ratio if private==1, absorb(year provid industry_name_CSRC_f) vce(cluster provi
> d)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =        345
Absorbing 3 HDFE groups                           F(   1,     17) =      10.59
Statistics robust to heteroskedasticity           Prob > F        =     0.0047
                                                  R-squared       =     0.1706
                                                  Adj R-squared   =     0.0999
                                                  Within R-sq.    =     0.0052
Number of clusters (provid)  =         18         Root MSE        =     0.3056

                                (Std. Err. adjusted for 18 clusters in provid)
------------------------------------------------------------------------------
             |               Robust
subsidy_as~w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
polcon_ratio |
         L1. |   .2381291   .0731794     3.25   0.005      .083734    .3925241
             |
       _cons |   .1671665   .0129798    12.88   0.000     .1397815    .1945514
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------+
          Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------+---------------------------------------|
                 year |         7           0           7     |
               provid |        18          18           0    *|
 industry_name_CSRC_f |         3           1           2     |
--------------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. est sto polcon_lag1_subass1

. reghdfe subsidy_assets_w L.polcon_ratio L.log_revenue_w if private==1, absorb(year provid industry_name_CSRC_f) v
> ce(cluster provid)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =        345
Absorbing 3 HDFE groups                           F(   2,     17) =      14.74
Statistics robust to heteroskedasticity           Prob > F        =     0.0002
                                                  R-squared       =     0.2003
                                                  Adj R-squared   =     0.1294
                                                  Within R-sq.    =     0.0409
Number of clusters (provid)  =         18         Root MSE        =     0.3005

                                 (Std. Err. adjusted for 18 clusters in provid)
-------------------------------------------------------------------------------
              |               Robust
subsidy_ass~w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
 polcon_ratio |
          L1. |   .3452073   .0688415     5.01   0.000     .1999645    .4904501
              |
log_revenue_w |
          L1. |  -.0467433   .0343366    -1.36   0.191    -.1191871    .0257005
              |
        _cons |   .6685793   .3750464     1.78   0.093    -.1226994    1.459858
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------+
          Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------+---------------------------------------|
                 year |         7           0           7     |
               provid |        18          18           0    *|
 industry_name_CSRC_f |         3           1           2     |
--------------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. est sto polcon_lag1_subass2

. reghdfe subsidy_assets_w L.polcon_ratio L.log_assets_w if private==1, absorb(year provid industry_name_CSRC_f) vc
> e(cluster provid)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =        345
Absorbing 3 HDFE groups                           F(   2,     17) =      17.26
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.2073
                                                  Adj R-squared   =     0.1370
                                                  Within R-sq.    =     0.0493
Number of clusters (provid)  =         18         Root MSE        =     0.2992

                                (Std. Err. adjusted for 18 clusters in provid)
------------------------------------------------------------------------------
             |               Robust
subsidy_as~w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
polcon_ratio |
         L1. |   .3423257   .0592175     5.78   0.000     .2173878    .4672636
             |
log_assets_w |
         L1. |  -.0624124   .0388026    -1.61   0.126    -.1442787     .019454
             |
       _cons |   .9011106   .4632515     1.95   0.068    -.0762647    1.878486
------------------------------------------------------------------------------

Absorbed degrees of freedom:
--------------------------------------------------------------+
          Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------------+---------------------------------------|
                 year |         7           0           7     |
               provid |        18          18           0    *|
 industry_name_CSRC_f |         3           1           2     |
--------------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. est sto polcon_lag1_subass3

. reghdfe subsidy_assets_w L.polcon_ratio L.log_assets_w L.ROA_w if private==1, absorb(provid industry_year) vce(cl
> uster provid)
(MWFE estimator converged in 8 iterations)

HDFE Linear regression                            Number of obs   =        345
Absorbing 2 HDFE groups                           F(   3,     17) =      12.50
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.2277
                                                  Adj R-squared   =     0.1232
                                                  Within R-sq.    =     0.0495
Number of clusters (provid)  =         18         Root MSE        =     0.3016

                                (Std. Err. adjusted for 18 clusters in provid)
------------------------------------------------------------------------------
             |               Robust
subsidy_as~w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
polcon_ratio |
         L1. |   .3653202   .0742552     4.92   0.000     .2086554    .5219851
             |
log_assets_w |
         L1. |  -.0615602   .0396588    -1.55   0.139    -.1452329    .0221125
             |
       ROA_w |
         L1. |  -7.97e-06   .0036348    -0.00   0.998    -.0076768    .0076608
             |
       _cons |   .8868098   .4671493     1.90   0.075     -.098789    1.872409
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------+
   Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------+---------------------------------------|
        provid |        18          18           0    *|
 industry_year |        21           0          21     |
-------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. est sto polcon_lag1_subass4

. reghdfe subsidy_assets_w L.polcon_ratio L.log_assets_w L.ROA_w if private==1, absorb(current_gvn_f industry_year)
>  vce(cluster provid)
(dropped 6 singleton observations)
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs   =        339
Absorbing 2 HDFE groups                           F(   3,     17) =       7.21
Statistics robust to heteroskedasticity           Prob > F        =     0.0025
                                                  R-squared       =     0.2826
                                                  Adj R-squared   =     0.1340
                                                  Within R-sq.    =     0.0537
Number of clusters (provid)  =         18         Root MSE        =     0.3018

                                (Std. Err. adjusted for 18 clusters in provid)
------------------------------------------------------------------------------
             |               Robust
subsidy_as~w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
polcon_ratio |
         L1. |   .3437605   .0789617     4.35   0.000     .1771659     .510355
             |
log_assets_w |
         L1. |  -.0637985   .0379567    -1.68   0.111    -.1438801    .0162831
             |
       ROA_w |
         L1. |  -.0007383   .0035257    -0.21   0.837    -.0081769    .0067002
             |
       _cons |   .9246256   .4442183     2.08   0.053    -.0125931    1.861844
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-------------------------------------------------------+
   Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------+---------------------------------------|
 current_gvn_f |        35          35           0    *|
 industry_year |        21           0          21     |
-------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. est sto polcon_lag1_subass5

. 
. *outreg2 [polcon_lag1_subass1 polcon_lag1_subass2 polcon_lag1_subass3 polcon_lag1_subass4 polcon_lag1_subass5] us
> ing TableA12.tex, replace label dec(3)
. 
. log close
      name:  <unnamed>
       log:  C:\Users\Siyao\Dropbox\Yue-Siyao\Project Subsidy\PSRM replication files\analysis_other.log
  log type:  text
 closed on:  18 Aug 2022, 21:37:27
-------------------------------------------------------------------------------------------------------------------
